package com.huike.business.mapper;


import com.huike.business.domain.TbBusiness;
import com.huike.business.domain.dto.TbBusinessDto;
import com.huike.business.domain.dto.TbBusinessPoolDto;
import com.huike.business.domain.vo.TbBusinessVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface TbBusinessMapper {
    /**
     * 条件分页查询
     */
    List<TbBusinessVo> page(TbBusinessDto tdBusinessDto);

    /**
     * 添加商机
     * @param tbBusiness
     * @return
     */
    int add(TbBusiness tbBusiness);

    /**
     * 根据Id查询信息
     * @param businessId
     * @return
     */
    TbBusiness findById(Long businessId);

    /**
     * 修改商机
     * @param  tbBusiness
     * @return
     */
    int update(TbBusiness tbBusiness);

    /**
     * 公海池条件分页查询
     * @param tbBusinessPoolDto
     * @return
     */
    List<TbBusiness> poolPage(TbBusinessPoolDto tbBusinessPoolDto);


    /**
     * 退回公海
     * @param business
     * @return
     */
    int updateStatusAndReporting(TbBusiness business);

    /**
     *公海池捞取商机
     * @param ids
     * @return
     */
    int updateStatus(Long[] ids);
}
